package com.jackrain.nea.core.utility;

import com.alibaba.fastjson.JSONObject;

public class JSONUtil {
    public static String Standardization(String param) {
        JSONObject obj = JSONObject.parseObject(param);
        if (obj.containsKey("data")) {
            obj.put("fixcolumn", obj.getJSONObject("data"));
            obj.remove("data");
        }
        if (!obj.containsKey("param")) {
            return param;
        }
        JSONObject newobj = obj.getJSONObject("param");
        if (obj.containsKey("fixcolumn")) {
            newobj.put("fixcolumn", obj.getJSONObject("fixcolumn"));
        }
        if (obj.containsKey("isdelmtable")) {
            newobj.put("isdelmtable", obj.getJSONObject("isdelmtable"));
        }
        if (obj.containsKey("tabitem")) {
            newobj.put("tabitem", obj.getJSONObject("tabitem"));
        }
        return newobj.toString();
    }
}
